/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package samoloty.data;

import java.util.ArrayList;

/**
 *
 * @author borysfan
 */
public class HoldsPanelArray {
    private ArrayList<HoldsPanelItem> items = null;
    private int totalBaggage=0;
    private int totalCargo = 0;
    private int totalMail = 0;

    public HoldsPanelArray(){
        items=new ArrayList<HoldsPanelItem>();
    }

    public HoldsPanelItem get(int i){
        if(i<items.size()){
            return items.get(i);
        }
        return null;
    }

    public void add(HoldsPanelItem item){
        items.add(item);
    }

    public void setTotalBaggage(int tb){
        totalBaggage = tb;
    }

    public void setTotalCargo(int tc){
        totalCargo = tc;
    }

    public void setTotalMail(int tm){
        totalMail = tm;
    }

    public int getTotalBaggage(){
        return totalBaggage;
    }

    public int getTotalCargo(){
        return totalCargo;
    }

    public int getTotalMail(){
        return totalMail;
    }
}
